﻿@{
    ViewBag.Title = "Sua";
    Layout = "~/Views/Shared/Admin/_AdminLayout.cshtml";
}

@using(Html.BeginForm())
{
    <div id="content" class="span10">
        <div class="row-fluid sortable">
            <div class="box span12">
                <div class="box-content">
                    <div>
                        <ul class="breadcrumb">
                            <li>
                                <a href="#">Home</a> <span class="divider">/</span>
                            </li>
                            <li>
                                <a href="#">Thêm sản phẩm</a>
                            </li>
                        </ul>
                    </div>

                    <div class="form-actions">
                        <input type="submit" name="luu" class="btn btn-primary" value="Lưu và đóng">
                        <input type="submit" name="luu" class="btn btn-success" value="Lưu và tạo mới">
                        <a href="~/AdminUser" class="btn btn-inverse">Thoát</a>
                    </div>
                    <div class="row-fluid sortable">
                        <div class="box span12 form-horizontal" style="padding-top: 50px;width:975px;">
                            <div class="control-group">
                                <label class="control-label" for="typeahead">Tên phân quyền</label>
                                <div class="controls">
                                    <input type="text" value="" class = "input_text" style = "width:300px" name="txtTen"/>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label" for="typeahead">Chức năng</label>
                                <div class="controls">
                                    <div style="height:300px;overflow-y:scroll;" class="form-inline">
                                                @{
                                                List<BabyToys.Models.AssignedPermission> chucnangs = ViewBag.Permissions;
                                                foreach (var chucnang in chucnangs)
                                                {
                                                        <input type="checkbox" 
                                                               name="selectedPermissions" 
                                                               value="@chucnang.IdChucNang" 
                                                               @(Html.Raw(chucnang.Assigned ? "checked=\"checked\"" : "")) /> 
                                                        @chucnang.IdChucNang @:  @chucnang.TenChucNang
                                                        @:<br />
                                                }
                                           
                                            }
                                            </div>  
                                </div>
                            </div>
                            
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
}